<template>
  <div class="login_top w-full">
    <div class="login_logo w-full container mx-auto pl-2 md:pl-0">
      <img :src="logon" alt="">
    </div>
  </div>
  <a-spin :spinning="isProd">
    <div class="login_main w-full container mx-auto ">
      <div class="login_title">
        <div class="title m-10 md:m-20">
          百测网后台
        </div>
      </div>
      <div class="login_content justify-center">
        <div class="login_pic hidden md:block">
          <img :src="logon1" class="aspect-auto" alt="">
        </div>
        <div v-if="false" class="line hidden md:block"></div>
        <div  class="login_container">
          <div class="login_form w-full md:w-[500px] p-0 md:p-[40px]">
            <a-form :model="loginForm" ref="loginFormRef" @finish="submitForm"
            >
              <a-form-item name="userName" label="账号：">
                <a-input v-model:value="loginForm.userName" allowClear placeholder="请输入账号" />
              </a-form-item>
              <a-form-item name="passWord" label="密码：">
                <a-input-password v-model:value="loginForm.passWord" allowClear placeholder="请输入密码" />
              </a-form-item>
              <a-form-item>
                <a-button type="primary" html-type="submit" style="width: 100%;">登录</a-button>
              </a-form-item>
            </a-form>
          </div>
      </div>
      </div>
    </div>
  </a-spin>
  
</template>

<script setup>
import { useLoginAddAdapter } from '@/adapters/login/index.js';
const { submitForm, loginForm, phoneModalVisible, userId, updateUserPhone, isProd } = useLoginAddAdapter();
// import { loginRules } from '@/utils/verificate.js';
import logon1 from '@/assets/images/logo1.png'
import logon from '@/assets/images/logo.png'

</script>

<style lang="scss" >
.login_top {
  background-color: #f6f6f6;
  height: 60px;
  display: flex;
  align-items: center;
  .login_logo {
    margin: 0 auto;
    img {
      width: 124px;
      height: 40px;
    }
  }
}
.login_main {
  height: calc(100vh - 60px);
  margin: 0 auto;
  background: #fff;
  .login_title {
    display: flex;
    justify-content: center;
    align-items: center;
    .title {
      min-width: 125px;
      height: auto;
      font-size: 30px;
      font-weight: 600;
      color: #333;
      line-height: 30px;
      box-sizing: border-box;
      padding-bottom: 10px;
      border-bottom: 4px solid #409EFF;
      text-align: center;
    }
  }
  .login_content {
    display: flex;
    margin-top: 20px;
    .login_pic {
      max-width: 475px;
      max-height: 300px;
      img{
        width: 100%;
        height: 100%;
      }
    }
    .line {
      width: 1px;
      background: #d8d8d8;
    }
    .login_container {
      display: flex;
      align-items: center;
      .login_form {
        box-sizing: border-box;
        background-color: #fff;
        border-radius: 5px;
        padding-left: 0;
        h2{
          text-align: center;
          padding-bottom: 20px;
        }
      }
    }
  }
}
</style>